package com.zjuh.taofood.biz.bo;

import com.zjuh.taofood.biz.domain.ActiveTopicItemDO;
import com.zjuh.taofood.biz.domain.TopicItemDO;

public class ItemConverter {
	
	public static ActiveTopicItemDO toActiveTopicItemDO (TopicItemDO topicItemDO, long topicId) {
		ActiveTopicItemDO activeTopicItemDO = new ActiveTopicItemDO();
		activeTopicItemDO.setDescription(null);
		activeTopicItemDO.setItemId(topicItemDO.getItemId());
		activeTopicItemDO.setItemPicUrl(topicItemDO.getItemPicUrl());
		activeTopicItemDO.setItemUrl(topicItemDO.getClickUrl());
		activeTopicItemDO.setPrice(topicItemDO.getPrice());
		activeTopicItemDO.setSellerCreditScore(topicItemDO.getSellerCreditScore());
		activeTopicItemDO.setTitle(topicItemDO.getItemTitle());
		activeTopicItemDO.setTopicId(topicId);
		activeTopicItemDO.setVolume(topicItemDO.getVolume());
		activeTopicItemDO.setSellerNick(topicItemDO.getSellerNick());
		activeTopicItemDO.setCommission(topicItemDO.getCommission());
		activeTopicItemDO.setCommissionRate(topicItemDO.getCommissionRate());
		activeTopicItemDO.setTradeRatesCount(topicItemDO.getTradeRatesCount());
		activeTopicItemDO.setTradeRatesSnapshot(topicItemDO.getTradeRatesSnapshot());
		return activeTopicItemDO;
	}

}
